FindWindow
CHANGED WITH THE APPEARANCE MANAGER
Maps the location of the cursor to a part of the screen or a region of a window when your application receives a mouse-down event.
pascal short FindWindow ( Point thePoint, WindowPtr *theWindow);
thePoint
- The point, in global coordinates, where the mouse-down event occurred. Your application retrieves this information from the
where
field of the event structure.theWindow
- A pointer to the window in which the mouse-down event occurred.
FindWindow
producesnil
if the mouse-down event occurred outside a window.- function result
- Returns a short integer that specifies where the cursor was when the user pressed the mouse button; see "FindWindow Result Code Constants".
DISCUSSION
You typically call the functionFindWindow
whenever you receive a mouse-down event. TheFindWindow
function helps you dispatch the event by reporting whether the cursor was in the menu bar or in a window when the mouse button was pressed. If the cursor was in a window, the function will produce both a pointer to the window and a constant that identifies the region of the window in which the event occurred. If Appearance is available,FindWindow
may return theinCollapseBox
constant as one of the possible window regions.WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
TheinCollapseBox
constant will not be returned byFindWindow.